package com.lipaluma.test.db.annotations.clean;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation is used to clean manually the database after the test has running.
 * @author Mario
 */
@Documented
@Inherited
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface CleanAfterManually {

	/**
	 * files of sql queries that will be launched after the test.
	 * @return
	 */
	String[] files() default {};

	/**
	 * request to launch after the test
	 * @return
	 */
	String[] request() default {};

	/** 
	 * name of the datasource. If not defined, it will take the default datasource
	 * @return
	 */
	String dataSource() default "";
	
	/**
	 * List of {@link CleanAfterManually}
	 * @author Mario
	 *
	 */
	@Documented
	@Inherited
	@Target({ElementType.METHOD, ElementType.TYPE})
	@Retention(RetentionPolicy.RUNTIME)
	public @interface List {
		CleanAfterManually[] value() ;
	}
}
